﻿using System;

namespace BDAlertorApp.Model
{
    public class BdPacketData
    {
        /// <summary>
        /// 协议数据
        /// </summary>
        public String PacketData { set; get; }

        /// <summary>
        /// 原始协议数据
        /// </summary>
        public byte[] PacketBytes { get; set; }


        public void ReadFromBytes(byte[] bytes)
        {
            try
            {
                PacketBytes = bytes;
                PacketData = System.Text.Encoding.Default.GetString(bytes);
            }
            catch(Exception e)
            {
                
            }

        }
    }
}
